/**
 * Created by enixjin on 1/10/18.
 */
import {Action} from "./index";
import {AbstractRESTAction} from "./AbstractRESTAction";
import {ActionType} from "./Action";
import {AbstractDataAction} from "./AbstractDataAction";

export abstract class AbstractAppAction implements Action {
    type = ActionType.APP;
    payload = {};
    listAction? = false;

    /**
     * return null if there is no REST action.(is that possible?)
     */
    abstract getRestAction(): AbstractRESTAction;

    /**
     * return null if there is not data action.
     */
    abstract getDataAction(local): AbstractDataAction;

    abstract updateLocal(local): void;

    abstract loadFromLocal(local): any ;

    abstract getLocalKey(): any;
}
